package com.keepercloud.qqchat.service;

import com.keepercloud.qqchat.entity.ChatMessage;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author liyk
 * @date 2019/2/12
 */
@Service
public interface ChatMessageService {

    <S extends ChatMessage> S save(S entity);

    Long countByFromUsernameAndToUsername(String fromUsername, String toUsername);

    List<Map> findByFromUsernameAndToUsername(String fromUsername, String toUsername, Integer pageStart, Integer pageEnd);
}
